﻿@using Chaine.Models
@model IList<EventModels>
@{
    ViewBag.Title = "Events";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section maincontent{
    <h2>
        @ViewBag.Title</h2>
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <td>
                    No.
                </td>
                <td>
                    Title
                </td>
                <td>
                    Start DateTime
                </td>
                <td>
                    End DateTime
                </td>
            </tr>
        </thead>
        <tbody>
            @foreach (var e in Model)
            {
                var index = Model.IndexOf(e);
                <tr>
                    <td>@(index + 1)
                    </td>
                    <td>
                        @e.Title
                    </td>
                    <td>@e.StartDateTime.ToString("MM'/'dd'/'yyyy HH:mm")
                    </td>
                    <td>@e.EndDateTime.ToString("MM'/'dd'/'yyyy HH:mm")
                    </td>
                </tr>
   
            }
        </tbody>
    </table>
}
@section sidebar{
    @Html.Partial("~/views/shared/_homesidebar.cshtml")
}
